<?php

/**
 * room actions.
 *
 * @package    sf.mismanage.com
 * @subpackage room
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 2692 2006-11-15 21:03:55Z fabien $
 */
class roomActions extends sfActions
{
    /**
     * Executes index action
     *
     */
    public function executeIndex()
    {

        $c = new Criteria;
        $c->addDescendingOrderByColumn(RoomPeer::CREATED_AT);
        $this->rooms = RoomPeer::doSelect($c);
        //$this->forward('default', 'module');

        return sfView::SUCCESS;
    }
    public function executeSubmit()
    {
        $roomname = $this->getRequestParameter("roomname");

        $room = new Room;
        $room->setRoomname($roomname);

        $room->save();

        return sfView::SUCCESS;

    }
}
